package Ddmo04.duixiang;

import Demo02.DuiXiang.AD;
import Demo02.DuiXiang.ADHero;
import Demo02.DuiXiang.APHero;
import Demo02.DuiXiang.Support;

public class Hero {
    public String name;
    protected float hp;

    public static void main(String[] args) {
        ADHero ad = new ADHero();
        APHero ap = new APHero();
        Support s = new Support();
        Demo02.DuiXiang.Hero h = new Demo02.DuiXiang.Hero();
        h = ad;
        ad = (ADHero) h;
        h = s;
        s = (Support) h;
        AD ad1 =  ad;
        Demo02.DuiXiang.Hero h1 = ad;
        Demo02.DuiXiang.Hero h2 = ap;

        System.out.println(h1 instanceof ADHero);
        System.out.println(h2 instanceof APHero);

    }
}
